package com.ysp.summary.designpattern.simplefactory;

/**
 * 抽象一个人
 * @author Administrator
 */
public interface People {

    void work();


    /**
     * 具体的人分类
     */
     class Student implements People{

        @Override
        public void work() {
            System.out.println("写作业");
        }
    }

    /**
     * 具体的人分类
     */
     class Teacher implements People{

        @Override
        public void work() {
            System.out.println("上课，布置作业");
        }
    }
}
